import parentModel from "../parent/parentModel";
export default class entityModel extends parentModel{
    constructor() {
        super(entityModel,util.api.EntityModel);
        this.table='entityModels';
        this.typeList=['entity'];
        /** modelMap格式
         * {
            table: tableName,
            featureList: new Set(),
            valueList: new Set(),
            fieldList: new Set(),
            groupList: new Set(),
            fieldMap: {
            fieldname；fieldtype
            },
          }
         */
    }
    static create(record){
        let object=new entityModel();
        if(!!record){
            object.setRecord(record);
        };
        return object;
    }
    /**
     * 新增模板
     * @returns {{features: *[], comments: string, web: {}, values: {}, className: string, published: string, type: string, version: string, hier: *[], others: {}}}
     */
    static tpl(){
        return {
            // id: "",
            type:"",
            className:"",
            version: "1.0",
            published: true,
            features:[],
            values:{
                "general": [
                    {propertyName:"name", propertyType:"String",defaultValue:"",filter:"false", comments:""},
                ]
            },
            hier:[],
            web:{},
            others:{basic:[]},
            // createTime: dayjs.localeData(),
            // updateTime: (new Date()).toLocaleDateString(),
            comments: ""
        }
    }
}
